

#include <stdio.h>

int main(){
float n1, n2;
char op;

printf("Digite um cálculo no format: n1 op n2 : ");
scanf("%f %c %f", &n1, &op, &n2);
switch(op){
 case '+': 
          printf(" = %f", n1+n2);
          break;
 case '-': 
          printf(" = %f", n1-n2);
          break;
 case '/': 
          printf(" = %f", n1/n2);
          break;
 case '*': 
          printf(" = %f", n1*n2);
          break;
 default: printf("Operação inválida!");
          break;
}

return 0;
}
